//
//  IncomeExpenseTable.m
//  Wallets Manager
//
//  Created by Tung Nguyen on 10/18/12.
//  Copyright (c) 2012 BKHN. All rights reserved.
//

#import "IncomeExpenseTable.h"

@implementation IncomeExpenseTable
@synthesize incomeExpenseTableView;
@synthesize footerButton;
- (id)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        // Initialization code
    }
    return self;
}

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect
{
    // Drawing code
}
*/

-(id)initWithDataArray :(CGRect)frame{
    self = [super initWithFrame:CGRectMake(frame.origin.x, frame.origin.y, frame.size.width, frame.size.height)];
    if(self) {
        
        incomeExpenseTableView = [[UITableView alloc]initWithFrame:CGRectMake(0, 0, 320, 130) style:UITableViewStylePlain];
        incomeExpenseTableView.delegate = self;
        incomeExpenseTableView.dataSource = self;
        incomeExpenseTableView.backgroundColor = [UIColor clearColor];
        [self addSubview:incomeExpenseTableView];
        
        footerButton = [UIButton buttonWithType:UIButtonTypeCustom];
        [footerButton setImage:[UIImage imageNamed:@"footer_button"] forState:UIControlEventTouchUpInside];
        footerButton.frame = CGRectMake(0, 130, 320, 30);
        [self addSubview:footerButton];
    }
    return  self;
    
}
@end
